Skip to content

Improve/Fix ViewableProperty V2#602

Open
aloraman wants to merge 2 commits intoJetBrains:masterfrom
aloraman:lifetimes-viewable-property-rework
Open

Improve/Fix ViewableProperty V2#602
aloraman wants to merge 2 commits intoJetBrains:masterfrom
aloraman:lifetimes-viewable-property-rework

Conversation

@aloraman
Copy link
Contributor

@aloraman aloraman commented Mar 20, 2026

Reworks original PR #591 by @Iliya-usov

Original improvements and fixes:

  • Implement Memory.IsReadWriteAtomic
  • Make maybe return consistent value with hasValue
  • Fix tearing issues with myValue if T is long struct
  • Enforce memory ordering between myValue = value and myChange.Fire(value);

This PR reworks Memory.IsReadWriteAtomic to be consistent with CLR memory model and replaces corresponding test harness accordingly. No need for runtime sizeof support required - so no dependency on Unsafe/ReflectionEmit.

FYI @ForNeVeR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants